<div *ngIf="!auth || !auth['user_name']">
  <form (ngSubmit)="submit()">
    <table>
      <tr>
        <td>用户名</td>
        <td>
          <input type="text" [(ngModel)]="user.username" name="username" autofocus>
        </td>
      </tr>
      <tr>
        <td>密码</td>
        <td>
          <input type="text" [(ngModel)]="user.password" name="password">
        </td>
      </tr>
      <tr>
        <td>
          <button type="submit">提交</button>
        </td>
      </tr>
    </table>
  </form>
</div>
<div *ngIf="auth && auth['user_name']">
  <p>当前用户：{{auth['user_name']}}</p>
  <p>到期时间：{{auth['exp'] | date:'yyyy-MM-dd HH:mm:dd'}}</p>
  <p>是否可用：{{auth['active']}}</p>
  <p>用户权限：[{{auth['authorities']}}]</p>
</div>
